package com.ruoyi.inventory.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 库存流水对象 inventory_transaction
 * 
 * @author ruoyi
 * @date 2025-06-17
 */
public class InventoryTransaction extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 流水ID */
    private Long transactionId;

    /** 商品ID */
    @Excel(name = "商品ID")
    private Long productId;

    /** 商品编号 */
    @Excel(name = "商品编号")
    private String productCode;

    /** 商品名称 */
    @Excel(name = "商品名称")
    private String productName;

    /** 仓库ID */
    @Excel(name = "仓库ID")
    private Long warehouseId;

    /** 仓库名称 */
    @Excel(name = "仓库名称")
    private String warehouseName;

    /** 交易类型(1-采购入库 2-销售出库 3-盘点调整 4-调拨入库 5-调拨出库 6-其他入库 7-其他出库) */
    @Excel(name = "交易类型(1-采购入库 2-销售出库 3-盘点调整 4-调拨入库 5-调拨出库 6-其他入库 7-其他出库)")
    private String transactionType;

    /** 关联单号 */
    @Excel(name = "关联单号")
    private String transactionCode;

    /** 变动前数量 */
    @Excel(name = "变动前数量")
    private Long beforeQuantity;

    /** 变动数量 */
    @Excel(name = "变动数量")
    private Long changeQuantity;

    /** 变动后数量 */
    @Excel(name = "变动后数量")
    private Long afterQuantity;

    /** 交易时间 */
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @Excel(name = "交易时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date transactionTime;

    /** 操作人 */
    @Excel(name = "操作人")
    private String operator;

    public void setTransactionId(Long transactionId) 
    {
        this.transactionId = transactionId;
    }

    public Long getTransactionId() 
    {
        return transactionId;
    }

    public void setProductId(Long productId) 
    {
        this.productId = productId;
    }

    public Long getProductId() 
    {
        return productId;
    }

    public void setProductCode(String productCode) 
    {
        this.productCode = productCode;
    }

    public String getProductCode() 
    {
        return productCode;
    }

    public void setProductName(String productName) 
    {
        this.productName = productName;
    }

    public String getProductName() 
    {
        return productName;
    }

    public void setWarehouseId(Long warehouseId) 
    {
        this.warehouseId = warehouseId;
    }

    public Long getWarehouseId() 
    {
        return warehouseId;
    }

    public void setWarehouseName(String warehouseName) 
    {
        this.warehouseName = warehouseName;
    }

    public String getWarehouseName() 
    {
        return warehouseName;
    }

    public void setTransactionType(String transactionType) 
    {
        this.transactionType = transactionType;
    }

    public String getTransactionType() 
    {
        return transactionType;
    }

    public void setTransactionCode(String transactionCode) 
    {
        this.transactionCode = transactionCode;
    }

    public String getTransactionCode() 
    {
        return transactionCode;
    }

    public void setBeforeQuantity(Long beforeQuantity) 
    {
        this.beforeQuantity = beforeQuantity;
    }

    public Long getBeforeQuantity() 
    {
        return beforeQuantity;
    }

    public void setChangeQuantity(Long changeQuantity) 
    {
        this.changeQuantity = changeQuantity;
    }

    public Long getChangeQuantity() 
    {
        return changeQuantity;
    }

    public void setAfterQuantity(Long afterQuantity) 
    {
        this.afterQuantity = afterQuantity;
    }

    public Long getAfterQuantity() 
    {
        return afterQuantity;
    }

    public void setTransactionTime(Date transactionTime) 
    {
        this.transactionTime = transactionTime;
    }

    public Date getTransactionTime() 
    {
        return transactionTime;
    }

    public void setOperator(String operator) 
    {
        this.operator = operator;
    }

    public String getOperator() 
    {
        return operator;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("transactionId", getTransactionId())
            .append("productId", getProductId())
            .append("productCode", getProductCode())
            .append("productName", getProductName())
            .append("warehouseId", getWarehouseId())
            .append("warehouseName", getWarehouseName())
            .append("transactionType", getTransactionType())
            .append("transactionCode", getTransactionCode())
            .append("beforeQuantity", getBeforeQuantity())
            .append("changeQuantity", getChangeQuantity())
            .append("afterQuantity", getAfterQuantity())
            .append("transactionTime", getTransactionTime())
            .append("operator", getOperator())
            .append("remark", getRemark())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .toString();
    }
}
